package cn.findviewbydream.evil.bigtoutiao.utils;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;

/********************************************
 * 工程名：LwCar
 * 包名：cn.findviewbydream.evil.lwcar.utils
 * 时间：17-6-13
 * 作者：白雨濃 evil
 * 邮箱：evilbai@foxmail.com
 * 内容：intent工具
 ********************************************/
public class IntentUtil
{
    public static final int MAIN_TO_CITY_LIST_CODE = 10001;

    public static void startActivity(Context context, Class<? extends Activity> to)
    {
        Intent intent = new Intent(context, to);
        context.startActivity(intent);
    }


    public static void startActivity(Activity context, Class<? extends Activity> to)
    {
        Intent intent = new Intent(context, to);
        context.startActivity(intent);
    }

    public static void startActivityAndFinish(Activity context, Class<? extends Activity> to)
    {
        Intent intent = new Intent(context, to);
        context.startActivity(intent);
        context.finish();
    }
}
